﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using ObviousCode.UI.Aspect.ConfigHandler.ConfigurationSectionObjects;

namespace ObviousCode.UI.Aspect.ConfigHandler
{
    [XmlRoot("SurfaceObjectPluginAssemblyNames")]
    public class SurfaceObjectPluginAssemblyNames
    {
        List<SurfaceObjectPlugin> _plugins;

        public SurfaceObjectPluginAssemblyNames()
        {
            _plugins = new List<SurfaceObjectPlugin>();
        }

        [XmlArray("plugins")]
        [XmlArrayItem("plugin", typeof(SurfaceObjectPlugin))]//is this line necessary?
        public SurfaceObjectPlugin[] Plugins
        {
            get { return _plugins.ToArray(); }
            set { _plugins = new List<SurfaceObjectPlugin>(value.ToArray()); }
        }
    }
}
